package ex.com.jm.food.service.impl;

import java.util.List;

import ex.com.jm.food.dao.AdminSubTypeDao;
import ex.com.jm.food.entity.SubType;
import ex.com.jm.food.entity.SupType;
import ex.com.jm.food.service.AdminSubTypeService;
/**
 * 
 * @author zhaojw
 *
 */
public class AdminSubTypeServiceImpl implements AdminSubTypeService {

	private AdminSubTypeDao adminSubTypeDao;
	public AdminSubTypeDao getAdminSubTypeDao() {
		return adminSubTypeDao;
	}

	public void setAdminSubTypeDao(AdminSubTypeDao adminSubTypeDao) {
		this.adminSubTypeDao = adminSubTypeDao;
	}

	@Override
	public List<SubType> getSubTypes(int initPage, int pageRow, String name,
			Integer supId) {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().getSubTypes(initPage, pageRow, name, supId);
	}

	@Override
	public int subTypeCount(String name, Integer supId) {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().subTypeCount(name, supId);
	}

	@Override
	public Object saveSubType(SubType subType) {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().saveSubType(subType);
	}

	@Override
	public void updateSubType(SubType subType) {
		// TODO Auto-generated method stub
        this.getAdminSubTypeDao().updateSubType(subType);
	}

	@Override
	public SubType checkName(String name) {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().checkName(name);
	}

	@Override
	public SubType editSubType(Integer id) {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().editSubType(id);
	}

	@Override
	public void delSubType(Integer id) {
		// TODO Auto-generated method stub
         this.getAdminSubTypeDao().delSubType(id);
	}

	@Override
	public List<SupType> getSupTypes() {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().getSupTypes();
	}

	@Override
	public SupType getSupType(Integer supId) {
		// TODO Auto-generated method stub
		return this.getAdminSubTypeDao().getSupType(supId);
	}


}
